<!--
 * @Author: monet hanxu@huaun.com
 * @Date: 2023-09-21 09:08:11
 * @LastEditors: zhangyonggui
 * @LastEditTime: 2024-01-20 10:52:52
 * @FilePath: /h-radar-expose/components/ModelList.vue
 * @Description:
-->
<template>
  <div class="model-container">
    <div
      v-for="(item, index) in modelList"
      :key="index"
      :class="`model-item primary-dark-bg-${item.color || index}`"
    >
      <span class="item-label">{{ item.label }}</span>
      <div class="item-content">
        <el-tooltip
          placement="bottom"
          :content="item.content"
          :disabled="item.content ? false : true"
        >
          <el-tag>
            <span class="tag-text">{{ item.content || '--' }}</span>
          </el-tag>
        </el-tooltip>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup> 
import {defineProps} from 'vue';
const props=defineProps({
  modelList: {
      type: Array as any,
      default: () => {
        return []
      },
    },
})
</script>
<style lang="scss" scoped>
.model-container {
  .model-item {
    height: 42px;
    line-height: 42px;
    display: flex;
    padding: 0 $-v-spacing-vertical-medium;

    .item-label {
      width: 60px;
      flex-shrink: 0;
      margin-right: $-v-spacing-vertical-icon;
      color: #EBEBEB;
    }

    .item-content {
      flex: 1;
      max-width: 100%;
      overflow: hidden;
      .el-tag {
        //max-width: 100%;
        background: rgba(255, 255, 255, 0.15);
        color: #EBEBEB;
        border: none;
      }
    }
  }
}
</style>
